package faa;

import faa.users.*;

public class UserFactory {
	private UserFactory() {
		// Private constructor stub to prevent instantiation
	}
	
	public static User createUser(UserSchema user) {
		User nUser;
		
		if(user.getUserType().equals("TrafficManager")) {
			nUser = new TrafficManager(user.getUsername(), user.getPassword());
		}
		else {
			nUser = null;
		}
		
		return nUser;
	}
}
